/*
 * @Author: Gaq
 * @Date: 2022-10-13 23:24:55
 * @LastEditTime: 2022-11-26 17:10:55
 * @LastEditors: Gaq
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import '../src/styles/common.less'
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

import common from './utils/common.js'
import formDate from './utils/formDate.js'
import Prism from 'prismjs';
import hljs from 'highlight.js';
// 瀑布流布局插件
import mitt from 'mitt'
import { VueMasonryPlugin } from "vue-masonry/src/masonry.plugin";
// vuex仓库的导入
import store from './store/index.js'

VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});
VMdPreview.use(githubTheme, {
  Hljs: hljs,
});

const emitter = mitt()
const app = createApp(App)

app.config.globalProperties.$noMulClicks = common.noMulClicks
app.config.globalProperties.emitter = emitter
app.config.globalProperties.$formDate = formDate

app.use(router)
.use(store)
.use(VueMarkdownEditor)
.use(VMdPreview)
.use(VueMasonryPlugin)
.mount('#app')
